package me.spring.cloud.common.components.rabbitmq.service;

import me.spring.cloud.common.components.rabbitmq.message.IMessage;
import me.spring.cloud.common.components.rabbitmq.message.RetryMessage;

/**
 * @author luffy
 * @description: 消息发送
 * @date 2019-05-25 13:23
 */
public interface IMessageService {

  /**
   * @Author luffy
   * @Description 发送字符串消息
   * @Date 2019-05-30 08:55
   * @Param [queueName, message]
   * @Return void
   **/
  void send(String queueName, String message);

  /**
   * @Author luffy
   * @Description 发送自定义消息
   * @Date 2019-05-30 08:55
   * @Param [queueName, message]
   * @Return void
   **/
  void send(String queueName, IMessage message);

  /**
   * @Author luffy
   * @Description 发送延迟消息
   * @Date 2019-05-30 08:55
   * @Param [queueName, exchangeName, iMessage, second]
   * @Return void
   **/
  void send(String queueName, String exchangeName, IMessage iMessage, long second);

  /**
   * @Author luffy
   * @Description 发送延迟重试消息
   * @Date 2019-05-30 08:55
   * @Param [queueName, exchangeName, message, second]
   * @Return void
   **/
  void send(String queueName, String exchangeName, RetryMessage message, long second);
}
